<template>
	<div class="agreement">
		<rich-text :nodes="content"></rich-text>
	</div>
</template>

<script>
	import http from '../../utils/http';
	export default {
		data() {
			return {
				content: ''
			}
		},
		onLoad(opt) {
			http.request('base/configData')
				.then((res) => {
					if (opt.name == '用户协议') {
						this.content = res.data.ZhenkunxingUserAgreement
					} else {
						this.content = res.data.ZhenkunxingPrivacyPolicy
					}
				})
				.catch((res) => {
					uni.showToast({
						title: res.message,
						icon: 'none'
					});
				});
			uni.setNavigationBarTitle({
				title: opt.name
			})

		}
	}
</script>

<style lang="scss" scoped>
	.agreement {}
</style>